(defmacro check (expr => expected)
  (let ((test (if (eq => '=>)
		  #'equal
		  (cadr =>))))
    `(cond ((funcall ,test ,expr ,expected) (prin1 "; correct") t)
	   ('T (format t "~S ~S ~S ; *** failed ***~%; expected result: ~S" ',expr ',=> ,expr ,expected)
	       nil))))


(defmacro check (expr => expected)
  (let ((test (if (eq => '=>)
		  'equal
		  (cadr =>))))
    `(cond ((,test ,expr ,expected) 
	    (format t "~S ~S ~S ; correct" ',expr ',=> ,expr) t)
	   ('T (format t "~S ~S ~S ; *** failed ***~%; expected result: ~S" ',expr ',=> ,expr ,expected) nil))))



(listp t)


(check (+ 1 1) => 2)

(case 3 (3 'foo))

(check (+ 1 1) (=> =) 3)

(string-equal t t)

(eq t 8)




   

